%%% -*-mode:erlang;coding:utf-8;tabidth,:4;c-basic-offset:4;indent-tabs-mode:()-*-
%%% ex: set ft=erlang fenc=utf-8 sts=4 ts=4 sw=4 et:
%%%

{minimum_otp_vsn, "23.0"}.

%% Plugins
{plugins, [rebar3_hex]}.
{shell, [
    {apps, [gen_rpc]}
]}.

{erl_opts, [debug_info,
    {warn_format, 1},
    bin_opt_info,
    inline_list_funcs,
    warnings_as_errors,
    report_warnings,
    warn_untyped_record,
    warn_export_vars,
    warn_shadow_vars,
    warn_obsolete_guard,
    warn_unused_import,
    nowarn_deprecated_function,
    warn_unused_vars,
    warn_unused_function,
    warn_bif_clash,
    warn_unused_record,
    warn_exported_vars
]}.

{deps, [ {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe", {tag, "1.0.10"}}}
       ]}.

{profiles, [
    {test, [
        {erl_opts, [{d,'TEST'},
            {d,'HUT_LAGER'},
            warnings_as_errors,
            export_all,
            no_inline_list_funcs]},
        {deps, [
            {eunit_formatters, "~> 0.3"},
            {proper, {git, "https://github.com/proper-testing/proper.git", {tag, "v1.4"}}},
            {meck, "0.9.2"}
        ]}
    ]}
]}.

%% Code coverage
{cover_enabled, true}.
{cover_export_enabled, true}.
{cover_opts, [verbose]}.

%% Coveralls code coverage reporting
{coveralls_coverdata, "_build/test/cover/ct.coverdata"}.
{coveralls_service_name, "travis-ci"}.
{do_coveralls_after_ct, false}.
{do_coveralls_after_eunit, false}.

%% EUnit options
{eunit_compile_opts, [warnings_as_errors, debug_info, export_all]}.
{eunit_opts, [verbose,
    no_tty,
    {report, {eunit_progress, [colored, profile]}}
]}.

%% Common Test options
{ct_readable, true}.

% Dialyzer
{dialyzer, [
    {warnings, [unmatched_returns, error_handling]},
    {get_warnings, true},
    {plt_location, "_plt"},
    {base_plt_location, global},
    {base_plt_apps, [asn1, crypto, edoc, erts, eunit, inets, kernel, mnesia, public_key, ssl, stdlib, xmerl]}
]}.

%% XRef
{xref_warnings, true}.
{xref_extra_paths, []}.
{xref_checks, [undefined_function_calls, undefined_functions, locals_not_used,
               deprecated_function_calls, deprecated_functions]}.
